CREATE TABLE IF NOT EXISTS game(
    id varchar(20) NOT NULL,
    tags text NOT NULL,
    doc_num varchar(20),
    follow_num varchar(20),
    icon text NOT NULL,
    name text NOT NULL,
    short_intro longtext NOT NULL,
    PRIMARY KEY(id)
) ENGINE = MyISAM DEFAULT CHARSET = utf8;

INSERT INTO game
    (tags, doc_num, follow_num, icon, name, short_intro, id)
VALUES
    ("最新", 100, 20, "http\:\/\/yxfile.3k.com\/2017\/03\/02\/upload_1fqwhb3f4xriwhv8fm0r81uobeg10gzm.png", "罗马时代", "呵呵 ，我要迟到了", 2);

//创建文章详情
CREATE TABLE IF NOT EXISTS `article` (
    `id`
    INT UNSIGNED AUTO_INCREMENT,
    `shequ_id`
    VARCHAR(100) NOT NULL,
    `author`
    VARCHAR(40) NOT NULL,
    `time`
    timestamp not null
    default current_timestamp,
    `content`
    longtext NOT NULL,
    `is_ess`
    varchar(20),
    `is_hd_label`
    varchar(20),
    `is_office`
    varchar(20),
    `is_top`
    varchar(20),
    `like_num`
    varchar(20),
    `title`
    text,
    PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8;

{
    author: "小贱~",
    comment_num: "0",
    content: "sectionID呵呵~~谁发的发的发生的是否发生的法萨芬撒",
    hd_type: 0,
    headimgurl: "http://wx.qlogo.cn/mmopen/aoHF5icic2Az9rUKgDwRPTKvoJau6l83LgcJ4fK1EOoQyCB0TzuJTURa9zyeiciaeriaXEiam1NRe1kEOWfP80A0JsO9OTUJ5TzoibM/0",
    img_list: ["http://yxfile.3k.com/2017/07/20/upload_wmelaeji7fgbnc87v0kjlbelfu9bavoz"]
    is_ess: "0",
    is_hd_label: "0",
    is_office: "0",
    is_stra: 0,
    is_top: "0",
    like_num: "0",
    title: "sectionID呵呵~~谁发的发的发生"
}
//插入文章
INSERT INTO article(
    author,
    author_id,
    comment_num,
    title,
    content,
    headimgurl,
    img_list,
    is_ess,
    is_hd_label,
    is_office,
    is_stra,
    is_top,
    like_num,
    shequ_id
)
VALUES
    (
        "头记",
        3,
        0,
        "石头记",
        "大石头小石头，么有石头",
        "http://yxfile.3k.com/2017/06/28/upload_v3fgxw1btaediwyem8z1wlji6zrlpcsu!one",
        "http:\/\/yxfile.3k.com\/2017\/07\/12\/upload_fxr6dbwdis8guv6d3d7q08o8r5i5y9t1",
        0,
        0,
        0,
        0,
        0,
        90,
        1
    );




{
    author_id: "小贱~",
    comment_num: "0",
    content: "sectionID呵呵~~谁发的发的发生的是否发生的法萨芬撒",
    hd_type: 0,
    headimgurl: "http://wx.qlogo.cn/mmopen/aoHF5icic2Az9rUKgDwRPTKvoJau6l83LgcJ4fK1EOoQyCB0TzuJTURa9zyeiciaeriaXEiam1NRe1kEOWfP80A0JsO9OTUJ5TzoibM/0",
    img_list: ["http://yxfile.3k.com/2017/07/20/upload_wmelaeji7fgbnc87v0kjlbelfu9bavoz"]
    is_ess: "0",
    is_hd_label: "0",
    is_office: "0",
    is_stra: 0,
    is_top: "0",
    like_num: "0",
    title: "sectionID呵呵~~谁发的发的发生"
}
//===========================创建评论========================
{
    addtime: "2017-07-23 10:29:52",
    1
    comment_num: "0",
    1
    content: "大声道发送到士大夫的非发送到发非",
    1
    id: "51",
    1
    parent_id: "",
    1
    doc_id: "",
    1
    shequ_id: ""
    1
    img: "",
    is_ext: "0",
    is_like: 0,
    is_top: "0",
    like_num: "0",
    stair: "2", //楼层

}

//创建评论
CREATE TABLE IF NOT EXISTS `comment` (
    `id`
    INT UNSIGNED AUTO_INCREMENT,
    `shequ_id`
    VARCHAR(100) NOT NULL,
    `parent_id`
    VARCHAR(100) NOT NULL,
    `doc_id`
    VARCHAR(100) NOT NULL,
    `author_id`
    VARCHAR(40) NOT NULL,
    `addtime`
    timestamp not null
    default current_timestamp,
    `content`
    longtext NOT NULL,
    `is_like`
    varchar(20),
    `is_ext`
    varchar(20),
    `is_office`
    varchar(20),
    `is_top`
    varchar(20),
    `like_num`
    varchar(20),
    PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8;
//写入评论
INSERT INTO comment(
    shequ_id,
    author_id,
    parent_id,
    doc_id,
    content,
    is_like,
    is_ext,
    is_office,
    is_top,
    like_num
)
VALUES
    (
        1,
        1,
        1,
        1,
        "我是评论3",
        0,
        0,
        0,
        0,
        0
    );

//用户表
{
    "3k_account": "ab12345678",
    "3k_phone": "",
    "3kuid": "1",
    // collect_num: "0",
    // comment_num: "10",
    // doc_num: "8",
    exp: "0",
    last_login_device: "1",
    login_days: "1",
    lv: "LV.1",
    max_login_days: "3",
    nickname: "小贱~",
    red_icon: false,
    remain_score: "34",
    sex: "1",
    total_login_days: "10",
    total_score: "34",
    f_login_ip: "14.18.236.93",
    f_login_time: "2017-06-21 13:59:53",
    headimgurl: "http://wx.qlogo.cn/mmopen/aoHF5icic2Az9rUKgDwRPTKvoJau6l83LgcJ4fK1EOoQyCB0TzuJTURa9zyeiciaeriaXEiam1NRe1kEOWfP80A0JsO9OTUJ5TzoibM/0",
    is_follow: "0",
    is_night_push: "1",
    l_login_bbs_time: null,
    l_login_ip: "119.130.71.147",
    l_login_time: "2017-07-22 20:53:14",
    
    uid: "1"
}

CREATE TABLE IF NOT EXISTS `user` (
    `uid`
    INT UNSIGNED AUTO_INCREMENT,
     `3kuid`
    VARCHAR(100) NOT NULL,
    `3k_account`
    VARCHAR(100) NOT NULL default 0,
    `3k_phone`
    VARCHAR(100) NOT NULL,
    `exp`
    VARCHAR(100) NOT NULL,
    `last_login_device`
    VARCHAR(40) NOT NULL,
     `login_days`
     VARCHAR(40) NOT NULL,
    `lv`
    int(20),
    `max_login_days`
    varchar(20),
    `nickname`
    varchar(20),
    `red_icon`
    VARCHAR(100) NOT NULL default 0,
    `remain_score`
    varchar(20),
    `f_login_ip`
    varchar(20),
    `f_login_time`
    varchar(20),
    `headimgurl`
    varchar(200),
    `is_follow`
    varchar(20),
    `is_night_push`
    varchar(20),
    `l_login_bbs_time`
    varchar(20),
    `l_login_ip`
    varchar(20),
    `l_login_time`
    varchar(20),
    `shequ_list`
     int(20),
     `msg_site`
      int(20),
    PRIMARY KEY(`uid`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8;

INSERT INTO user(
    `3kuid`,
    `3k_account`,
    `3k_phone`,
    `exp`,
    last_login_device,
    login_days,
    lv,
    max_login_days,
    nickname,
    red_icon,
    remain_score,
    f_login_ip,
    f_login_time,
    headimgurl,
    is_follow,
    is_night_push,
    l_login_bbs_time,
    l_login_ip,
    l_login_time,
    shequ_list,
    msg_site
)
VALUES
    (
       2,
       12,
       13,
       14,
       15,
       16,
       17,
       18,
       19,
       10,
       "http:\/\/yxfile.3k.com\/2017\/07\/12\/upload_fxr6dbwdis8guv6d3d7q08o8r5i5y9t1",
       1,
       12,
       "13.4.6.8",
       14,
       15,
       16,
       17,
       18,
       "1,3",
       10
    );